#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n = 0;
    int m = 0;
    cin >> n >> m;
    vector<vector<int>> dp(n + 2, vector<int>(m + 2, 0));
    dp[0][1] = 1;
    for (int i = 1; i < n + 2; i++)
    {
        for (int j = 0; j < m + 2; j++)
        {
            dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
        }
    }
    cout << dp[n + 1][m + 1];

}